package name.yzhu.httpserver.handle;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface URLHandleAnno {
	/**
	 * http reuqest type  
	 * @see name.yzhu.httpserver.HttpRequestType
	 * @return  1: GET<br>  2: POST<br> 3: PUT<br> 4: Delete<br>
	 */
	public int requestType();
	/**
	 * The parameters used for map the queries of 
	 * post/get/put/delete method to the argument of handler method
	 * The comment of parameter should be follow empty space. 
	 * NOTE:<b>The comma does not allow appeared in comment</b>
	 * @return a string , separated by comma
	 */
	public String parameters() default "";
	/**
	 * The parameters used for map the path of 
	 * post/get/put/delete method to the argument of handler method
	 * The comment of parameter should be follow empty space. 
	 * NOTE:<b>The comma does not allow appeared in comment</b>
	 * @return a string , separated by comma
	 */
	public String extParameters() default "";
	/**
	 * indicate the required parameters 
	 * @return a string , separated by comma
	 */
	public String required() default "";
	/**
	 * pass HttpServletRequest 
	 * @return
	 */
	public boolean nativeReqeust() default false;
	/**
	 * pass HttpServletResponse
	 * @return
	 */
	public boolean nativeResponse() default false;
	/**
	 * naive means the parameters are httpServletRequest and httpServletResponse.
	 * @return
	 */
	public boolean isNative() default false;
}
